/// @description Insert description here
// You can write your code in this editor
vx = camera_get_view_x(view_camera[0]);
vy = camera_get_view_y(view_camera[0]);
function Quad(_vb, _x1, _y1, _x2, _y2)
{
	vertex_position_3d(_vb, _x1, _y1, 0);
	vertex_position_3d(_vb, _x1, _y1, 2);
	vertex_position_3d(_vb, _x2, _y2, 1);
	
	vertex_position_3d(_vb, _x1, _y1, 2);
	vertex_position_3d(_vb, _x2, _y2, 1);
	vertex_position_3d(_vb, _x2, _y2, 3);

}
if(mouse_check_button_pressed(mb_left))
{
	instance_create_depth(mouse_x, mouse_y, depth, oLight);
}

vertex_begin(vb, vf);
var _vb = vb;
with(oWall)
{
	Quad(_vb, x, y, x + sprite_width, y + sprite_height);	
	Quad(_vb, x + sprite_width, y, x, y + sprite_height);	
}
with(oTri)
{
	Quad(_vb, x, y, x + sprite_width, y + sprite_height);
	Quad(_vb, x, y + sprite_height, midX, midY);
	//Quad(_vb, x + sprite_width, y + sprite_height, midX, midY);	
}
vertex_end(vb);
depth = oPlayer.depth - 1;
